from django.db import models

class Bug(models.Model):
    """ 缺陷表 """
    username = models.CharField(verbose_name='账号', max_length=16)
    title = models.CharField(verbose_name='密码', max_length=64)
    createTime = models.DateTimeField(verbose_name='缺陷创建时间')
    latestEditTime = models.DateTimeField(verbose_name='缺陷最新编辑时间')
    priority = models.SmallIntegerField(verbose_name='优先级', choices=((1, '高'), (2, '中'), (3, '低')))
    severity = models.SmallIntegerField(verbose_name='严重程度', choices=((1, '严重'), (2, '主要'), (3, '次要')))
    function = models.CharField(verbose_name='功能', max_length=16)
    status = models.SmallIntegerField(verbose_name='状态', choices=((1, '打开'), (2, '进行中'), (3, '已解决'), (4, '已拒绝')))
    description = models.CharField(verbose_name='描述', max_length=128)
    attachment = models.FileField(upload_to='uploads/')
